#ifndef UI_MOUSE_H
#define UI_MOUSE_H
#include "../core/screen.h"
#include "../affiliate/sprite.h"
#include "../core/node.h"
class uiMouse :public screen{
protected:
    sprite *mouse_up = nullptr,*mouse_down = nullptr;
    float timer_ = 0.0f;
public:
    static uiMouse* createUiMouse(node* parent,const char* mouse_up_path, 
        const char* mouse_down_path ,float scale = 1.0f ,Anchor anchor = Anchor::ANCHOR_CENTER);
    sprite *getMouseUp(){return mouse_up;}
    sprite *getMouseDown(){return mouse_down;}
    void setMouseUp(sprite *up){mouse_up = up;}
    void setMouseDown(sprite *down){mouse_down = down;}
    float getTimer(){return timer_;}
    void setTimer(float timer){timer_ = timer;}
    virtual void update(float dt) override;
};
#endif